$OpenBSD: patch-modules_ctl_init_socks_c,v 1.2 2015/11/20 10:09:52 sthen Exp $
--- modules/ctl/init_socks.c.orig	Fri Oct  2 15:35:17 2015
+++ modules/ctl/init_socks.c	Mon Oct 19 14:00:40 2015
@@ -85,9 +85,9 @@ int init_unix_sock(struct sockaddr_un* su, char* name,
 	unlink(name);
 	memset(&ifsun, 0, sizeof (struct sockaddr_un));
 	len=strlen(name);
-	if (len>UNIX_PATH_MAX){
-		LOG(L_ERR, "ERROR: init_unix_sock: name too long (%d > %d): %s\n",
-				len, UNIX_PATH_MAX, name);
+	if (len>sizeof(ifsun.sun_path)){
+		LOG(L_ERR, "ERROR: init_unix_sock: name too long (%d > %ld): %s\n",
+				len, sizeof(ifsun.sun_path), name);
 		goto error;
 	}
 	ifsun.sun_family=AF_UNIX;
